

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="adminmain" />
        <title>SMF Administration - Content Management</title>
    </head>
    
    <body>

		<br>

        <div class="body">
        
            <h1>Content Management - List</h1>
            
            <g:if test="${flash.message}">
            	<div class="message">${flash.message}</div>
            </g:if>
            
            
            <div class="list">
				<table>
					<thead>
						<tr>

							<g:sortableColumn property="id" title="Id" />

							<g:sortableColumn property="title" title="Title" />
							
							<g:sortableColumn property="enabled" title="Enabled" />

							<g:sortableColumn property="dateCreated" title="Date Created" />

						</tr>
					</thead>

					<tbody>
					<g:each in="${storyList}" status="i" var="story">
						<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

							<td><g:link action="storyShow" id="${story.id}">${story.id?.encodeAsHTML()}</g:link></td>

							<td>${story.title?.encodeAsHTML()}</td>
							
							<td>${story.enabled?.encodeAsHTML()}</td>

							<td>${story.dateCreated?.encodeAsHTML()}</td>

						</tr>
					</g:each>
					</tbody>
				</table>
			</div>
			
			<div class="paginateButtons">
				<g:paginate total="${Story.count()}" />
            </div>

			<br>

			<div class="buttons">
				<span class="menuButton">
					<g:link action="storyCreate">Add New Success Story</g:link>
				</span>
			</div>


        </div>
    </body>
</html>
